import Vue from 'vue'
import VueRouter from 'vue-router'
/* 路由 start */
import toolsRouter from './toolsRouter';
/* 路由 over */

Vue.use(VueRouter)


const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (to) {
  return VueRouterPush.call(this, to).catch(err => err)
}

const routes = [
	// 首页
    {
        path: "/",
        name: "home",
        component: () => import(/* webpackChunkName: "home" */ '../views/index.vue'),
        meta: {
            title: "首页",
        }
    },
	// 路由引入
	...toolsRouter,
]

const router = new VueRouter({
	// mode: 'history',
	base: process.env.BASE_URL,
	routes
})

export default router
